local xuanwu = fk.CreateSkill{
  name = "hx__black_tortoise&"
}

Fk:loadTranslationTable{
  ["hx__black_tortoise&"] = "玄武",
  [":hx__black_tortoise&"] = "你可以将一张牌当【桃】使用。"
}

xuanwu:addEffect("viewas", {
  pattern = "peach",
  anim_type = "defensive",
  card_filter = function (self, player, to_select, selected, selected_targets)
    return #selected == 0
  end,
  view_as = function (self, player, cards)
    if #cards == 0 then return end
    local peach = Fk:cloneCard("peach")
    peach:addSubcard(cards[1])
    peach.skillName = xuanwu.name
    return peach
  end,
  before_use = function (self, player, use)
    local room = player.room
    room:removePlayerMark(player, "@!!black_tortoise", 1)
    if player:getMark("@!!black_tortoise") == 0 then
      player:loseFakeSkill(xuanwu.name)
    end
  end,
  enabled_at_response = function (self, player, response)
    return not response
  end
})

return xuanwu